Skip to content

Conversation

@rossgray
Copy link

What changes are proposed in this pull request?

Fixes #1046

Currently any retry_timeout_seconds passed into the Config is not passed along to other methods or properties, such as oidc_endpoints. This is an issue because it can lead to the instantiation of the Config class taking 5 minutes if an invalid host is provided (this is the default timeout).

This PR ensures the retry_timeout_seconds is respected when fetching account and workspace endpoints.

How is this tested?

Prior to this PR, this code will fail after 5 minutes:

from databricks.sdk.core import Config

config = Config(
    host="invalid",
    client_id="invalid",
    client_secret="invalid",
    retry_timeout_seconds=30,
)
ValueError: default auth: oauth-m2m: Timed out after 0:05:00. Config: host=https://invalid, client_id=invalid, client_secret=***, retry_timeout_seconds=30

After this change, it will fail after 30 seconds as expected:

ValueError: default auth: oauth-m2m: Timed out after 0:00:30. Config: host=https://invalid, client_id=invalid, client_secret=***, retry_timeout_seconds=30

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1085
  • Commit SHA: 62d2a07765b0b4f82b37e0da02690ebb0cecf5d9

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ISSUE] Non-configurable timeout for initializing Config

1 participant